import { defineComponent, ref } from 'vue'

export default defineComponent({
  props: ['msgFromChild'],
  setup(props, ctx) {
    const content = ref('')
    const handleClick = () => {
      ctx.emit('grandChildToChild', content.value)
    }
    const render = () => {
      return (
        <div>
          <div>{props.msgFromChild}</div>
          <el-input v-model={content.value}></el-input>
          <el-button onClick={handleClick}>向父亲tsx组件通信</el-button>
        </div>
      )
    }
    return render
  }
})
